#include "Ctrl.h"


#if SigletonPattern_


class Singleton final
{
private:
	static  Singleton* instance;
	Singleton(){}
public:
	static Singleton* GetInstance() {
		return instance;
	}
};

Singleton* Singleton::instance = new Singleton();


int main() {
	Singleton* pS1 = Singleton::GetInstance();
	Singleton* pS2 = Singleton::GetInstance();
	if (pS1 == pS2) {
		cout << "两个对象是相同的实例" << endl;
	}
}



#endif